<?php
// +----------------------------------------------------------------------
// | 幕小铺
// +----------------------------------------------------------------------
// | 版权所有 2016~2020 幕小铺科技（大连）有限公司
// +----------------------------------------------------------------------
// | 2020/03/14
// +----------------------------------------------------------------------
namespace app\user_center\middleware;
 
class Check1{
     //第三个参数，可以通过路由赋值传递
    public function handle($request, \Closure $next, $name)
    {
        //下面这一句是 给控制器 传值
        $request->hello = 'ThinkPHP';
        //dump($request);
        if($request->controller() == 'Publics'){
            echo "无需安全认证";
        }else{
            echo "需安全认证";
        }
        
        //dump($request);


        
        return $next($request);
    }
     
}